package com.vcc.data.mapper;

import com.mybatisflex.core.BaseMapper;
import com.vcc.data.entity.ReserveCard;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ReserveCardMapper extends BaseMapper<ReserveCard> {

    @Select("select * from vcc_reserve_card where card_id = #{cardId} and status = 0 LIMIT #{count}")
    List<ReserveCard> findAllByCardIdAndCount(@Param("cardId")Long cardId, @Param("count")Integer count);
}
